<?php
require_once("Includes.php");


class Staff extends User
    {
     protected static $table_name="staff";
	   protected static $db_fields = array('ID','user_ID', 'department_ID');
       protected $ID;
       protected $user_ID;
	   protected $department_ID;

   public function set_id($ID)
   {
     $this->ID = $ID;
   }

   public function get_id()
   {
     return $this->ID;
   }

  public function set_user_id($ID)
  {
    $this->user_ID = $ID;
  }

  public function get_user_id()
  {
    return $this->user_ID;
  }

  public function set_department_ID($ID)
  {
    $this->department_ID = $ID;
  }

  public function get_department_ID()
  {
   return $this->department_ID;
  }
  
   public static function find_staff_id($user_ID)
  {
    global $database;
    $sql="SELECT ID FROM ". self::$table_name ." WHERE user_ID='{$user_ID}'";
    $result = $database->doQuery($sql);
    $row = mysqli_fetch_array($result);
    return $row['ID'];
  }
  
  
  
	 
}
?>